package com.quinn.myDemo.testforcode;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONPath;
import com.alibaba.fastjson.JSONReader;
import com.taobao.api.ApiException;
import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import com.taobao.api.request.AlibabaAlihealthDrugCodeKytQuerycodeRequest;
import com.taobao.api.request.AlibabaAlihealthDrugMscGetentinfoRequest;
import com.taobao.api.response.AlibabaAlihealthDrugCodeKytQuerycodeResponse;
import com.taobao.api.response.AlibabaAlihealthDrugMscGetentinfoResponse;

import java.util.ArrayList;

/**
 * Demo092301
 *
 * @author HanQuinn
 * Date: 2024/9/23
 * Time: 16:35
 */
public class Demo092301 {

    public static void main(String[] args) {
        try {
            TaobaoClient client = new DefaultTaobaoClient("http://gw.api.taobao.com/router/rest", "34695618", "37ade9e9219e9dc86bf58d2e1c5282b9");
            AlibabaAlihealthDrugCodeKytQuerycodeRequest req = new AlibabaAlihealthDrugCodeKytQuerycodeRequest();
            req.setRefEntId("eddba00125164822823e6484c35d5d93");
            req.setCodes("88347360000850109925");
            AlibabaAlihealthDrugCodeKytQuerycodeResponse rsp = client.execute(req);
            System.out.println(rsp.getBody());
            JSONObject jsonObject = JSON.parseObject(rsp.getBody());
            Object read = JSONPath.read(rsp.getBody(), "$.alibaba_alihealth_drug_code_kyt_querycode_response.result.models.code_full_info_dto");


            String b = "1q";
        } catch (ApiException e) {

            System.out.println(e.getSubErrMsg());
        }
    }
}
